home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Temic Semiconductors Tech…al Library 1997 February
/
Temic Semiconductors Technical Library - 1997 February.iso
/
TEMIC2.DIR
/
00039_Script_on start movie
< prev
next >
Wrap
Text File
|
1997-03-18
|
3KB
|
95 lines
on startMovie
global myCD, myCursor, acroreadpath
if the colorDepth = 4 then
set the stagecolor = 11
else
set the stagecolor = 208
end if
-- define the 'hand' cursor
set myCursor to [397, 398]
cursor -1
set the exitLock = TRUE
-- determine the CD drive
put CheckDrive("findcd\xxxcd.txt") into myCD
-- find the location of the acrobat reader
-- determine the windows directory
put getOSDirectory() into windir
-- open the file win.ini for read only
set myFile = new(xtra "fileio")
put "\temic.ini" after windir
put openFile(myFile, windir, 1) into openResult
-- read win.ini into theFile
set theFile = readFile(myFile)
-- find the line for the Acrobat Reader and extract the path
put offset("reader", theFile) into pdfposition
put offset(".", theFile) into pdfend
set pdfend = pdfend + 3
if pdfposition = 0 then
-- search the win.ini file
-- determine the windows directory
put getOSDirectory() into windir1
-- open the file win.ini for read only
set myFile = new(xtra "fileio")
put "\win.ini" after windir1
put openFile(myFile, windir1, 1) into openResult
-- read win.ini into theFile
set theFile = readFile(myFile)
-- find the line for the Acrobat Reader and extract the path
put offset("pdf=", theFile) into pdfposition1
if pdfposition1 = 0 then
alert "The Acrobat Reader could not be found. Please install it from the TEMIC CD."
exit
else
put char pdfposition1 to pdfposition1 + 50 of theFile into acroreadpath
put offset(" ", acroreadpath) into pdfend
put char 5 to pdfend of acroreadpath into acroreadpath
end if
closeFile(myFile)
else
put char pdfposition to pdfend of theFile into acroreadpath
put char 8 to pdfend of acroreadpath into acroreadpath
end if
end
on CheckDrive weirdfil
set testfile = EMPTY
set myFile = 0
if objectP(myFile) then set myFile = 0
repeat with I = 66 to 90
set drive = numToChar( I )
set myThisPath = string(drive & ":\"& weirdfil)
set myFile = new(xtra "fileio")
openfile(myFile, myThisPath, 1)
set testfile = readFile(myFile)
if not voidP(testfile) then
set myfile = 0
return drive&":"
exit
end if
end repeat
alert "Please check, if the TEMIC CD is in your CD drive."
end